package com.bw.news.bind;

import androidx.databinding.BindingAdapter;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.chad.library.adapter.base.BaseQuickAdapter;

public class NewsBind {


    @BindingAdapter(value = "newsrecycler")
    public static void News(RecyclerView recyclerView,
                                    BaseQuickAdapter baseQuickAdapter){
        LinearLayoutManager manager = new LinearLayoutManager(recyclerView.getContext());
        manager.setOrientation(LinearLayoutManager.VERTICAL);
        recyclerView.setLayoutManager(manager);
        recyclerView.setAdapter(baseQuickAdapter);


    }
}
